(directory_files_internal): Initialize errno.
authorGerd Moellmann <gerd@gnu.org>
Tue, 13 Feb 2001 15:13:54 +0000 (15:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 13 Feb 2001 15:13:54 +0000 (15:13 +0000)
(toplevel): Include errno.h.

src/dired.c

index 4994241c2cf68ad4f259af0b8dc7500c705cf6cb..f3f13534a876231db5bd9d99f468b78a928b7be9 100644 (file)
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA.  */
 #include <sys/stat.h>
 
 #include "systime.h"
+#include <errno.h>
 
 #ifdef VMS
 #include <string.h>
@@ -208,6 +209,7 @@ directory_files_internal (directory, full, match, nosort, attrs)
 #endif /* not VMS */
 
   /* Loop reading blocks until EOF or error.  */
+  errno = 0;
   while ((dp = readdir (d)) != NULL)
     {
       if (DIRENTRY_NONEMPTY (dp))